          
          
         
            //var originalWidth = consultWidth = window.innerWidth;
            var linkJumpCount = 8;
            var jumpHref;
            var beginningDelay = 0;
            var animateDelayCount = 1310;
            var menuColor = null;
            var needChange = false;
            var prevent = false;
            var watchBrowse = null;
            function countDown(){
                    if($('header .menu.show').length){
                        linkJumpCount = 1;
                    }
                    console.log(linkJumpCount);
                    linkJumpCount -= 1;
                    //linkJumpCount=0时，跳转页面
                    if(linkJumpCount <= 0){
                        console.log(jumpHref);
                        location.href = jumpHref;
                    }

                    //每秒执行一次,showTime()
                    setTimeout("countDown()",100);
            }
            
            //内容高度是否小于屏幕高度
            function checkContnHeight(){
                if($('.container')[0].offsetHeight < window.innerHeight){
                    $('.container').addClass('fillAll');
                }
            }
            function beginningAtTop(){
                setTimeout(function(){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                },10)
            }
            //判断是否为移动设备
            function browserRedirect(){
                var sUserAgent = navigator.userAgent.toLowerCase();
                var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
                var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
                var bIsMidp = sUserAgent.match(/midp/i) == "midp";
                var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
                var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
                var bIsAndroid = sUserAgent.match(/android/i) == "android";
                var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
                var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
                if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
                    $('body').addClass('mobileDevice');
                    return true;
                }else{
                    return false;
                }
            }
            
            $(document).ready(function(){
                    browserRedirect(); 
                    
                    
                    $('header .top .menuBtn').click(function(){
                        var className = $('.blkCover')[0].className;
                        var thisName = $(this)[0].className;
                        if($(this)[0].className.indexOf('clicked') >= 0){
                            var scrollTop = Math.abs(parseFloat($('body')[0].style.top));
                            prevent = false;
                            $(this).removeClass('clicked');
                            className = className.replace('leave','enter');
                            $('header .menu').removeClass('show');
                            $('html').removeClass('noScroll');
                            $('body')[0].style.top = '';
                            $(this).removeClass('active');
                            document.documentElement.scrollTop = document.body.scrollTop = scrollTop;
                        }else{
                            prevent = true;
                            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
                            $(this).addClass('clicked');
                            className = className.replace('enter','leave');
                            $('header .menu').addClass('show');
                            $('html').addClass('noScroll');
                            $('body')[0].style.top = '-' + scrollTop + 'px';
                            $(this).addClass('active');
                        }
                        $('.blkCover')[0].className = className;
                    })

                    $('a').click(function(e){
                            if($(this).siblings('.sonMenu').length && !$(this).siblings('.sonMwnu').height()) return false;
                            jumpHref = $(this).attr('href');
                            console.log(jumpHref);
                            e = e || window.event;
                            e.cancelBubble = true;
                            e.stopPropagation();
                            if(e.preventDefault){ // w3c
                                e.preventDefault();
                            } else { // ie
                                e.returnValue = false;
                            }
                            if(!$('header .menu.show').length){
                                $('.blkCover').addClass('jump');
                                var className = $('.blkCover')[0].className;
                                className = className.replace('enter','leave');
                                $('.blkCover')[0].className = className;
                            }
                            countDown();
                    })
                    $('header .menu li').mouseenter(function(){
                        if(window.innerWidth < 768){
                            if($(this).find('.box .sonMenu').length){
                                var height = 0;
                                for(var a = 0; a < $(this).find('.sonMenu a').length;a++){
                                    height += $(this).find('.sonMenu a')[a].offsetHeight;
                                }
                                $(this).find('.box .sonMenu').height(height);
                            }
                        }
                        
                    })
                    $('header .menu li').mouseleave(function(){
                        if(window.innerWidth < 768){
                            if($(this).find('.box .sonMenu').length){
                                $(this).find('.box .sonMenu').height(0);
                            }
                        }
                        
                    })
                    
            })

        